package br.ufrgs.meetapp.models;

import java.util.ArrayList;

import br.ufrgs.meetapp.enums.DeviceProvider;
import br.ufrgs.meetapp.enums.Role;

public class User implements Cloneable {
	
	private String fullName;
	private String phone;
	private String username;
	private String companyName;
	private String password;
	private String email;
	private ArrayList<Role> roleList;
	private int registeredDevicesNumber;
	private int deviceLicensesNumber;
	
	/** device IMEI */
	private String deviceIMEI;
	/** description??? */
	private String deviceDescription;
	/** device SISOP */
	private DeviceProvider deviceProvider;
	/** device phone number */
	private String devicePhoneNumber; 

	/** name registered for this buddy - maybe the driver, the employee */
	private String deviceName;
	/** email registered for this buddy */
	private String deviceDriverEmail;
	
	
	public String getUsername() {
		return username;
	}
	public void setUsername(String name) {
		this.username = name;
	}
	public String getCompanyName() {
		return companyName;
	}
	public void setCompanyName(String companyName) {
		this.companyName = companyName;
	}
	public String getPassword() {
		return password;
	}
	public void setPassword(String password) {
		this.password = password;
	}
	public String getEmail() {
		return email;
	}
	public void setEmail(String email) {
		this.email = email;
	}
	public String getFullName() {
		return fullName;
	}
	public void setFullName(String fullName) {
		this.fullName = fullName;
	}
	public String getPhone() {
		return phone;
	}
	public void setPhone(String phone) {
		this.phone = phone;
	}
	/**
	 * @return the deviceIMEI
	 */
	public String getDeviceIMEI() {
		return deviceIMEI;
	}
	/**
	 * @param deviceIMEI the deviceIMEI to set
	 */
	public void setDeviceIMEI(String deviceIMEI) {
		this.deviceIMEI = deviceIMEI;
	}
	/**
	 * @return the deviceDescription
	 */
	public String getDeviceDescription() {
		return deviceDescription;
	}
	/**
	 * @param deviceDescription the deviceDescription to set
	 */
	public void setDeviceDescription(String deviceDescription) {
		this.deviceDescription = deviceDescription;
	}
	/**
	 * @return the deviceProvider
	 */
	public DeviceProvider getDeviceProvider() {
		return deviceProvider;
	}
	/**
	 * @param deviceProvider the deviceProvider to set
	 */
	public void setDeviceProvider(DeviceProvider deviceProvider) {
		this.deviceProvider = deviceProvider;
	}
	/**
	 * @return the deviceLineNumber
	 */
	public String getDevicePhoneNumber() {
		return devicePhoneNumber;
	}
	/**
	 * @param deviceLineNumber the deviceLineNumber to set
	 */
	public void setDevicePhoneNumber(String devicePhoneNumber) {
		this.devicePhoneNumber = devicePhoneNumber;
	}
	/**
	 * @return the deviceName
	 */
	public String getDeviceName() {
		return deviceName;
	}
	/**
	 * @param deviceName the deviceName to set
	 */
	public void setDeviceName(String deviceName) {
		this.deviceName = deviceName;
	}
	/**
	 * @return the deviceDriverEmail
	 */
	public String getDeviceDriverEmail() {
		return deviceDriverEmail;
	}
	/**
	 * @param deviceDriverEmail the deviceDriverEmail to set
	 */
	public void setDeviceDriverEmail(String deviceDriverEmail) {
		this.deviceDriverEmail = deviceDriverEmail;
	}
	
	public Object clone(){
		try {
			User cloned = (User)super.clone();
			return cloned;
		}
		catch(Exception exception){
			System.out.println("Error in User.Clone - trying to clone");
			if(exception.getMessage() != null)
				System.out.println(exception);
			exception.printStackTrace();
			return null;
		}
	}
	public ArrayList<Role> getRoleList() {
		return roleList;
	}
	public void setRoleList(ArrayList<Role> roleList) {
		this.roleList = roleList;
	}
	public int getRegisteredDevicesNumber() {
		return registeredDevicesNumber;
	}
	public void setRegisteredDevicesNumber(int registeredDevicesNumber) {
		this.registeredDevicesNumber = registeredDevicesNumber;
	}
	public int getDeviceLicensesNumber() {
		return deviceLicensesNumber;
	}
	public void setDeviceLicensesNumber(int deviceLicensesNumber) {
		this.deviceLicensesNumber = deviceLicensesNumber;
	}
}
